package com.finalcial.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * 用于界面跳转的controller
 * @author Administrator
 *
 */
@Controller
@RequestMapping("/chooseApplication")
public class ChooseApplicationController {
	
	//跳转到申请类型选择界面
	@RequestMapping("/chooseType")
	public String chooseApplication() {
		return "expenseplatform/apply/submitApply";
		
	}
	//补单的示例
	@RequestMapping("/apply")
	public String apply(@RequestParam("reimbursementName") String reimbursementName){
		String url = "";
		if("domesticTravelSingle".equals(reimbursementName)){
			url = "expenseplatform/declarationinformation/domestictravelApply";
		}else if("officialTraffic".equals(reimbursementName)){
			url = "expenseplatform/declarationinformation/officialtrafficApply";
		}else if("propertyManager".equals(reimbursementName)){
			url = "expenseplatform/declarationinformation/propertyManagerApply";
		}else if("staffForm".equals(reimbursementName)){
			url = "expenseplatform/declarationinformation/staffFormApply";
		}
		return url;
	}

	//申请界面的示例
	@RequestMapping("/applyDemo")
	public String applyDemo(@RequestParam("reimbursementName") String reimbursementName){
		String url = "";
		if("domestictravelDemo".equals(reimbursementName)){
			url = "datamanager/personwork/domestictravelDemo";
		}else if("officialtrafficDemo".equals(reimbursementName)){
			url = "datamanager/personwork/officialtrafficDemo";
		}else if("propertyManagerDemo".equals(reimbursementName)){
			url = "datamanager/personwork/propertyManagerDemo";
		}else if("staffformDemo".equals(reimbursementName)){
			url = "datamanager/personwork/staffformDemo";
		}
		return url;
	}
}
